package com.biancheng.biancheng.L2;

public class 二叉树的镜像 {

    public static void main(String[] args) {
        二叉树的镜像 ff = new 二叉树的镜像();
        TreeNode result = ff.mirrorTree(null);
        System.out.println(result);
    }
    public TreeNode mirrorTree(TreeNode root) {
        if(root == null){
            return root;
        }
        TreeNode tmp = root.left;
        root.left = mirrorTree(root.right);
        root.right = mirrorTree(tmp);
        return root;
    }

}
